package com.eshopkeeper.core.base;

import com.baomidou.mybatisplus.plugins.Page;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


/**
 * @author chenshufeng
 * @version 2017年3月17日20日 下午3:19:19
 */
public interface BaseProvider<T extends BaseModel> {
    @Transactional
    public T update(T record);

    @Transactional
    public void delete(Long id, Long userId);

    public T queryById(Long id);

    public Page<T> query(Map<String, Object> params);

    public <K> Page<K> getPage(Page<Long> ids, Class<K> cls);

    public <K> List<K> getList(List<Long> ids, Class<K> cls);
}
